#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>
#include<stdio.h>
#include<string.h>
#include<vector>
#include<stack>
#include<queue>
#include<map>
using namespace std;

int main() {
    string s;
    map<string, int> mp;
    while (cin >> s)
    {
        if (s[s.size() - 1] == '.')
        {
            s.resize(s.size() - 1);
        }
        for (int i = 0; i < s.size(); i++)
        {
            s[i] = tolower(s[i]);
        }
        mp[s]++;
    }
    for (auto e : mp)
    {
        cout << e.first << ':' << e.second << endl;
    }
}
